#ifndef SESSION_H
#define SESSION_H

#include <string>
#include <ctime>
#include <iostream>
#include "CsvRow.h"

class Session {
public:
  Session(const std::string& id, const std::string& committeeId,
    time_t date):
    m_id(id),    
    m_committeeId(committeeId),    
    m_date(date)
  {
  }

  Session():
    m_date(0)
  {
  }

  virtual ~Session()
  {
  }

  const std::string id() const { return m_id; }  
  const std::string committeeId() const { return m_committeeId; }  
  time_t date() const { return m_date; }

  bool empty() const 
  {
    return m_id.empty() &&      
      m_committeeId.empty() &&      
      m_date == 0;
  }

  Session& operator=(const Session& other);

  bool operator==(const Session& other) const;

private:
  std::string m_id;
  std::string m_committeeId;
  time_t m_date;
};

std::ostream& operator<<(std::ostream& stream, const Session &session);
std::istream& operator>>(std::istream& stream, Session& session);

#endif // SESSION_H